from django.urls import path
from .views import PositionListCreateAPIView, PositionRetrieveUpdateDestroyAPIView, ExcelUploadAPIView, \
    PositionListAPIView, QuestionListWithAnswersAPIView, QuestionAndAnswerCreateAPIView, QuestionAndAnswerDeleteAPIView, \
    RandomQuestionListAPIView, ProductList, ProductDetail

urlpatterns = [
    path('execlupload/', ExcelUploadAPIView.as_view(), name='execlupload'),
    path('getlist/', PositionListAPIView.as_view(), name='getAll'),
    path('positions/', PositionListCreateAPIView.as_view(), name='position-list-create'),
    path('positions/<int:pk>/', PositionRetrieveUpdateDestroyAPIView.as_view(),
         name='position-retrieve-update-destroy'),
    path('questions/', QuestionListWithAnswersAPIView.as_view(), name='question-list-with-answers'),
    path('randomQuestions/', RandomQuestionListAPIView.as_view(), name='randomQuestions'),
    path('questions-and-answers/create/', QuestionAndAnswerCreateAPIView.as_view(), name='question-and-answer-create'),
    path('questions-and-answers/<int:question_id>/delete/', QuestionAndAnswerDeleteAPIView.as_view(),
         name='question-and-answer-delete'),
    path('products/', ProductList.as_view(), name='product-list'),
    path('products/<int:pk>/', ProductDetail.as_view(), name='product-detail'),
]